package flatbuf
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type BodyCompression struct {
_tab flatbuffers .Table
}
func GetRootAsBodyCompression (buf []byte , offset flatbuffers .UOffsetT ) *BodyCompression {
n := flatbuffers .GetUOffsetT (buf [offset :])
x := &BodyCompression {}
x .Init (buf , n +offset )
return x
}
func (rcv *BodyCompression ) Init (buf []byte , i flatbuffers .UOffsetT ) {
rcv ._tab .Bytes = buf
rcv ._tab .Pos = i
}
func (rcv *BodyCompression ) Table () flatbuffers .Table {
return rcv ._tab
}
func (rcv *BodyCompression ) Codec () CompressionType {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (4 ))
if o != 0 {
return CompressionType (rcv ._tab .GetInt8 (o + rcv ._tab .Pos ))
}
return 0
}
func (rcv *BodyCompression ) MutateCodec (n CompressionType ) bool {
return rcv ._tab .MutateInt8Slot (4 , int8 (n ))
}
func (rcv *BodyCompression ) Method () BodyCompressionMethod {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (6 ))
if o != 0 {
return BodyCompressionMethod (rcv ._tab .GetInt8 (o + rcv ._tab .Pos ))
}
return 0
}
func (rcv *BodyCompression ) MutateMethod (n BodyCompressionMethod ) bool {
return rcv ._tab .MutateInt8Slot (6 , int8 (n ))
}
func BodyCompressionStart (builder *flatbuffers .Builder ) {
builder .StartObject (2 )
}
func BodyCompressionAddCodec (builder *flatbuffers .Builder , codec CompressionType ) {
builder .PrependInt8Slot (0 , int8 (codec ), 0 )
}
func BodyCompressionAddMethod (builder *flatbuffers .Builder , method BodyCompressionMethod ) {
builder .PrependInt8Slot (1 , int8 (method ), 0 )
}
func BodyCompressionEnd (builder *flatbuffers .Builder ) flatbuffers .UOffsetT {
return builder .EndObject ()
}
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .